package com.fengye.school.model.school;


import com.fengye.school.model.BaseEntity;
import com.fengye.school.model.school.enums.GradeType;
import lombok.Getter;
import lombok.Setter;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import java.util.Set;

/**
 * 年级表
 */
@Table(name = "tb_s_grade")
@org.hibernate.annotations.Table(appliesTo = "tb_s_grade", comment = "年级")
@Entity
@Getter
@Setter
public class Grade extends BaseEntity {

    @Column(name ="grade_type", columnDefinition = "varchar(50) COMMENT '年级名称'")
    private GradeType gradeType;

    @OneToMany(mappedBy = "grade", targetEntity = EClass.class)
    private Set<EClass> eClassSet;
}
